<%-- 
    Document   : FormLogin
    Created on : Nov 19, 2013, 5:03:41 PM
    Author     : agung
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Form Login</title>
        <link href="css/screen.css" rel="stylesheet" type="text/css"/>

    </head>
    <body>
        <div id="container"><center><img src="gambar/indomaretheader.png" width="1000" height="250"></center>
            <div id="content">
                <div id="form-login"> 
                    <form id="FLogin" name="FLogin" action="LoginController" onsubmit="return validateForm();"> 
                        <h1>Login</h1>   
                        <label>Username </label> : <input name="username" type="text" id="username" size="20" maxlength="20" class="txt" /><br/>   
                        <label>Password </label> : <input name="password" type="password" id="password" size="20" maxlength="20" class="txt" />   
                        <div id="tombol">
                            <input name="btnLogin" type="submit" value="Login" class="button" />
                            <input name="btnReset" type="reset" value="Reset" class="button" />
                        </div> 
                    </form> 

                    <script>
                        function validateForm()
                        {
                            var x = document.forms["FLogin"]["username"].value;
                            if (x === null || x === "")
                            {
                                alert("Username harus diisi");
                                return false;
                            }
                            var y = document.forms["FLogin"]["password"].value;
                            if (y === null || y === "")
                            {
                                alert("Password harus diisi");
                                return false;
                            }
                        }
                    </script>
                </div> 
            </div>
            <div id="footer">
                Copyright © Sistem Informasi Distributor Indomaret, 2013
            </div>
        </div>
    </body>
</html>
